<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBasicsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('basics', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('pid');                 //pid 和user_personnels表关联
            $table->integer('uid');                 //用户id
            $table->string('company',50);    //职位名称
            $table->string('true_name',50);  //真实姓名
            $table->tinyInteger('true_name_look')->default(1);  //名称显示 名字   先生/女士 默认名显示字
            $table->string('mobile',20);    //手机
            $table->string('mailbox',50);   //邮箱
            $table->string('birth',20);              //出生年份
            $table->string('province',20)->nullable();//省
            $table->string('city',20)->nullable();//市
            $table->string('area',20)->nullable();//区
            $table->string('start_work_time',20);     //开始工作时间
            $table->string('annual_salary');     //当前年薪
            $table->tinyInteger('is_look_annual_salary')->default(1);      //当前年薪是否对hr显示
            $table->string('now_status');      //当前状态 是否在职
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('basics');
    }
}
